#! /usr/bin/bash
ANTLR_JAR=antlr-4.13.2-complete.jar
# 1. 下载ANTLR工具 (v4.13+)
if [ ! -f "$ANTLR_JAR" ]; then
    wget "https://www.antlr.org/download/$ANTLR_JAR"
fi
# 2. 生成Python代码
java -jar "$ANTLR_JAR" -Dlanguage=Python3 CPP14Lexer.g4
java -jar "$ANTLR_JAR" -Dlanguage=Python3 CPP14Parser.g4
java -jar "$ANTLR_JAR" -Dlanguage=Python3 OpenCL.g4
